       Stack segment stack
       DW 64 dup (?)
       Stack ends

       cr EQU 13
       lf EQU 10

       Data segment
           String_1  DB  'String to Numeric conversion$'
           String_2  DB  'The number is successfully placed in "Number"$'
           String_3  DB  'Enter the number -> $'
           Str_num   DB  7,?,5 dup (?)
           Number    DW  (?)
           Dummy     DW  0
       Data ends

       Code segment
       Assume CS:Code , DS:Data
       ORG 100h
       Begin : MOV AX , Data
               MOV DS, AX
               MOV AH , 9h
               LEA DX , String_1
               INT 21h
               MOV AH , 2h
               MOV DL , cr
               INT 21h
               MOV AH , 2h
               MOV DL , lf
               INT 21h

               MOV AH , 9h
               LEA DX , String_3
               INT 21h

               MOV DX , offset Str_num
               MOV AH , 0Ah
               INT 21h
               MOV AH , 2h
               MOV DL , cr
               INT 21h
               MOV AH , 2h
               MOV DL , lf
               INT 21h

               MOV CH , Str_num [1]
               INC CH
               MOV AX , 0
               MOV BX , 2
               MOV CL , 10

       Start : MOV DL , Str_num [BX]
               SUB DL , '0'
               MUL CL
               MOV Byte ptr Dummy , DL
               ADD AX , Dummy
               MOV Dummy , 0
               INC BX
               CMP BL , CH
               JLE start
               MOV Number , AX

               MOV AH , 9h
               LEA DX , String_2
               INT 21h

               MOV AH , 2h
               MOV DL , cr
               INT 21h
               MOV AH , 2h
               MOV DL , lf
               INT 21h
               MOV AH , 2h
               MOV DL , Byte ptr Number
               INT 21h

               MOV AH , 4Ch
               INT 21h

       Code ends
       End Begin
